cod_damage_inflict

Syntax

forward cod_damage_inflict(attacker, victim, Float:damage, Float:factor, flags);

Usage

attacker
Attacker index
victim
Victim index
damage
Amount of damage to deal
factor
Intelligence bonus for damage
flags
Damage flags in DMG_* format

Description

Multiforward called before cod_inflict_damage (custom HamTakeDamage) is executed.

Note

Flags bitsum can contain custom DMG_ flags, so damage type can be easily identified:
DMG_CODSKILL (always), DMG_DYNAMITE, DMG_MINE, DMG_ROCKET, DMG_THUNDER, DMG_KILL, DMG_REPEAT.

Return

Set to COD_BLOCK (-1.0) to block damage